Skip to content

Conversation

morrisonlevi
Copy link
Contributor

@morrisonlevi morrisonlevi commented May 19, 2025

What does this PR do?

Converts from lz4 compression to zstd for file uploads in the profiler.

Breaking Change

This is a breaking change in the sense that tooling and tests may have previously assumed that the compression is lz4. Using an lz4 decompressor on zstd input will obviously fail.

Motivation

tl;dr Generally faster while creating smaller files.

zstd may have a better tradeoff for performance to compressed size.

Here are some benchmarks on compressors for a CPU profile which I cannot share publicly yet. We're working on anonymizing it so we can commit these to the repository. Throughput is in MiB/s. Utility is the compression ratio multiplied by throughput. This is on an Apple M1 Max.

Algo.      Size     Ratio    Throughput     Utility
None    2363410     1.000     11,746.     11,746.
lz4     1215720     1.944        459.23      892.74
zstd-1   778653     3.035        518.39    1,573.31
zstd-2   745217     3.171        350.07    1,110.07
zstd-3   698466     3.384        277.35      938.55
zstd-4   694724     3.402        270.86      921.47

I tested zstd-5 and zstd-6 informally, and compression rations were incrementally better, but you lose throughput steadily. Sticking to something in the level 1-4 range seems better.

And here's from another, also not public set of data:

Algo.      Size     Ratio    Throughput     Utility
None    5804495     1.0000    11.901.     11,901.
lz4     1467466     3.9554       760.52    3,008.1
zstd-1   746324     7.7774       728.48    5,665.6
zstd-2   727673     7.9768       639.62    5,102.1
zstd-3   696252     8.3368       585.82    4,883.9
zstd-4   696241     8.3369       569.99    4,751.9

My personal opinion is that zstd-1 is a safe upgrade. The performance is roughly similar to lz4, but the compression is much better.. Moving to a higher level is something that could be discussed.

Additional Notes

Currently lacks tests, pushed to see if this will cause build issues or significant artifact size bloat.

How to test the change?

As noted in Breaking Change, this adjusts the outputs to be zstd compressed instead of lz4 compressed. Tests which work on compressed files need updated.

@github-actions github-actions bot added the profiling Relates to the profiling* modules. label May 19, 2025
@morrisonlevi morrisonlevi added the enhancement New feature or request label May 19, 2025
@r1viollet
Copy link
Contributor

r1viollet commented May 19, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.19 MB 7.44 MB +3.47% (+256.00 KB) ⚠️
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 70.99 MB 82.42 MB +16.08% (+11.42 MB) 🚨
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 83.30 MB 95.61 MB +14.77% (+12.30 MB) 🚨
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.25 MB 9.53 MB +3.04% (+288.82 KB) ⚠️
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 18.39 MB 18.78 MB +2.12% (+400.00 KB) ⚠️
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 65.77 KB 65.77 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 125.10 MB 125.75 MB +.51% (+664.00 KB) 🔍
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 654.42 MB 656.23 MB +.27% (+1.80 MB) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 5.88 MB 6.26 MB +6.61% (+398.50 KB) 🚨
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 65.77 KB 65.77 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 17.37 MB 18.89 MB +8.72% (+1.51 MB) 🚨
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 32.21 MB 36.60 MB +13.63% (+4.39 MB) 🚨
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 15.68 MB 15.93 MB +1.62% (+261.50 KB) ⚠️
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 66.79 KB 66.79 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 127.41 MB 128.13 MB +.57% (+744.00 KB) 🔍
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 644.54 MB 645.40 MB +.13% (+889.31 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 4.49 MB 4.81 MB +6.94% (+320.00 KB) 🚨
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 66.79 KB 66.79 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 18.50 MB 20.05 MB +8.35% (+1.54 MB) 🚨
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 30.25 MB 34.34 MB +13.50% (+4.08 MB) 🚨
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 63.64 MB 71.42 MB +12.22% (+7.77 MB) 🚨
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.51 MB 8.85 MB +4.08% (+356.00 KB) ⚠️
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 78.07 MB 90.43 MB +15.83% (+12.35 MB) 🚨
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.85 MB 10.20 MB +3.56% (+359.82 KB) ⚠️

@pr-commenter
Copy link

pr-commenter bot commented May 19, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-10-09 04:32:09

Comparing candidate commit 868f0dc in PR branch PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog with baseline commit f65f27b in branch main.

Found 13 performance improvements and 0 performance regressions! Performance is the same for 40 metrics, 2 unstable metrics.

scenario:benching serializing traces from their internal representation to msgpack

  • 🟩 execution_time [-629.053µs; -615.225µs] or [-4.178%; -4.087%]

scenario:credit_card/is_card_number/x371413321323331

  • 🟩 execution_time [-400.724ns; -396.859ns] or [-6.227%; -6.167%]
  • 🟩 throughput [+10215407.070op/s; +10319419.583op/s] or [+6.574%; +6.641%]

scenario:credit_card/is_card_number_no_luhn/x371413321323331

  • 🟩 execution_time [-400.792ns; -396.283ns] or [-6.227%; -6.157%]
  • 🟩 throughput [+10196885.842op/s; +10318329.577op/s] or [+6.563%; +6.641%]

scenario:normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...

  • 🟩 execution_time [-18.421µs; -18.265µs] or [-8.974%; -8.897%]
  • 🟩 throughput [+475980.549op/s; +480016.350op/s] or [+9.771%; +9.854%]

scenario:normalization/normalize_name/normalize_name/bad-name

  • 🟩 execution_time [-854.684ns; -826.188ns] or [-4.584%; -4.431%]
  • 🟩 throughput [+2488324.428op/s; +2576699.657op/s] or [+4.640%; +4.805%]

scenario:normalization/normalize_name/normalize_name/good

  • 🟩 execution_time [-873.278ns; -844.019ns] or [-7.982%; -7.714%]
  • 🟩 throughput [+7657017.026op/s; +7915575.813op/s] or [+8.377%; +8.660%]

scenario:normalization/normalize_service/normalize_service/test_ASCII

  • 🟩 execution_time [-1.968µs; -1.907µs] or [-4.185%; -4.055%]
  • 🟩 throughput [+899433.283op/s; +928837.001op/s] or [+4.229%; +4.368%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 10.487ms 10.516ms ± 0.016ms 10.514ms ± 0.009ms 10.526ms 10.541ms 10.571ms 10.584ms 0.66% 1.171 2.478 0.15% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [10.514ms; 10.519ms] or [-0.021%; +0.021%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 4.956µs 5.032µs ± 0.045µs 5.045µs ± 0.035µs 5.067µs 5.093µs 5.096µs 5.097µs 1.03% -0.205 -1.438 0.88% 0.003µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.026µs; 5.038µs] or [-0.123%; +0.123%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 186.490µs 186.936µs ± 0.374µs 186.883µs ± 0.127µs 187.011µs 187.234µs 188.972µs 189.921µs 1.63% 5.132 32.377 0.20% 0.026µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5265340.240op/s 5349441.161op/s ± 10586.638op/s 5350927.540op/s ± 3647.046op/s 5354503.792op/s 5357779.632op/s 5359784.549op/s 5362204.155op/s 0.21% -5.085 31.892 0.20% 748.588op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.632µs 17.806µs ± 0.093µs 17.797µs ± 0.087µs 17.891µs 17.926µs 17.977µs 18.022µs 1.26% -0.061 -1.393 0.52% 0.007µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55489199.721op/s 56162526.562op/s ± 291945.070op/s 56187707.260op/s ± 274726.382op/s 56443117.038op/s 56583471.605op/s 56675523.997op/s 56714339.795op/s 0.94% 0.070 -1.395 0.52% 20643.634op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 9.991µs 10.082µs ± 0.080µs 10.077µs ± 0.026µs 10.099µs 10.144µs 10.169µs 11.064µs 9.80% 9.345 111.469 0.79% 0.006µs 1 200
normalization/normalize_name/normalize_name/good throughput 90383162.514op/s 99190295.085op/s ± 735182.628op/s 99237913.654op/s ± 257016.664op/s 99512691.705op/s 99801555.008op/s 99931542.780op/s 100094363.770op/s 0.86% -8.733 101.460 0.74% 51985.262op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [186.884µs; 186.988µs] or [-0.028%; +0.028%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5347973.954op/s; 5350908.367op/s] or [-0.027%; +0.027%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.793µs; 17.819µs] or [-0.072%; +0.072%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [56122065.783op/s; 56202987.341op/s] or [-0.072%; +0.072%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.071µs; 10.093µs] or [-0.110%; +0.110%] None None None
normalization/normalize_name/normalize_name/good throughput [99088405.843op/s; 99292184.326op/s] or [-0.103%; +0.103%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 14.365ms 14.433ms ± 0.036ms 14.425ms ± 0.017ms 14.446ms 14.484ms 14.550ms 14.643ms 1.51% 2.159 8.191 0.25% 0.003ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [14.428ms; 14.438ms] or [-0.035%; +0.035%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.319µs 2.376µs ± 0.017µs 2.376µs ± 0.010µs 2.387µs 2.404µs 2.414µs 2.418µs 1.77% -0.496 1.223 0.71% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.373µs; 2.378µs] or [-0.099%; +0.099%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.897µs 3.911µs ± 0.002µs 3.911µs ± 0.001µs 3.912µs 3.915µs 3.916µs 3.917µs 0.16% -0.744 6.250 0.06% 0.000µs 1 200
credit_card/is_card_number/ throughput 255295254.055op/s 255681782.392op/s ± 151607.405op/s 255692356.082op/s ± 91090.856op/s 255772032.274op/s 255883990.312op/s 255960857.459op/s 256618699.250op/s 0.36% 0.758 6.333 0.06% 10720.262op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 76.837µs 78.544µs ± 0.807µs 78.451µs ± 0.564µs 79.086µs 79.962µs 80.303µs 81.634µs 4.06% 0.449 0.216 1.03% 0.057µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12249779.121op/s 12733028.342op/s ± 130328.031op/s 12746733.180op/s ± 91301.928op/s 12829800.741op/s 12915094.882op/s 12998749.490op/s 13014624.167op/s 2.10% -0.388 0.097 1.02% 9215.583op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 69.838µs 70.932µs ± 0.622µs 70.820µs ± 0.379µs 71.269µs 72.077µs 72.928µs 72.940µs 2.99% 0.830 0.898 0.87% 0.044µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13709897.223op/s 14099080.325op/s ± 122786.263op/s 14120295.925op/s ± 76021.551op/s 14186384.989op/s 14283760.340op/s 14309421.818op/s 14318921.507op/s 1.41% -0.773 0.760 0.87% 8682.300op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.893µs 3.911µs ± 0.003µs 3.911µs ± 0.002µs 3.912µs 3.915µs 3.916µs 3.916µs 0.14% -1.459 10.852 0.06% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255341755.517op/s 255706660.127op/s ± 165711.371op/s 255710484.132op/s ± 101789.229op/s 255815635.063op/s 255921018.511op/s 255980166.966op/s 256876210.480op/s 0.46% 1.480 11.019 0.06% 11717.563op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 66.881µs 68.245µs ± 0.662µs 68.151µs ± 0.438µs 68.689µs 69.436µs 69.904µs 70.012µs 2.73% 0.430 -0.275 0.97% 0.047µs 1 200
credit_card/is_card_number/378282246310005 throughput 14283340.163op/s 14654420.666op/s ± 141672.838op/s 14673393.899op/s ± 94058.447op/s 14750864.932op/s 14861718.580op/s 14919789.995op/s 14951976.373op/s 1.90% -0.386 -0.319 0.96% 10017.782op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.150µs 52.213µs ± 0.037µs 52.209µs ± 0.021µs 52.230µs 52.293µs 52.314µs 52.345µs 0.26% 0.973 0.917 0.07% 0.003µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19104154.457op/s 19152397.632op/s ± 13668.163op/s 19153692.119op/s ± 7786.399op/s 19162026.612op/s 19170660.168op/s 19175006.702op/s 19175298.381op/s 0.11% -0.969 0.907 0.07% 966.485op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.026µs 6.036µs ± 0.013µs 6.034µs ± 0.003µs 6.037µs 6.044µs 6.107µs 6.147µs 1.87% 5.368 33.534 0.22% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 162679640.982op/s 165666910.193op/s ± 363951.710op/s 165725231.669op/s ± 85817.602op/s 165812312.972op/s 165889973.881op/s 165920859.082op/s 165933933.660op/s 0.13% -5.324 33.001 0.22% 25735.272op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.894µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.913µs 3.917µs 3.919µs 3.926µs 0.35% -0.216 7.466 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254734809.806op/s 255628503.087op/s ± 191902.904op/s 255632257.453op/s ± 116078.983op/s 255753298.997op/s 255860589.633op/s 255930600.659op/s 256782646.996op/s 0.45% 0.237 7.537 0.07% 13569.584op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 63.976µs 64.429µs ± 0.150µs 64.432µs ± 0.101µs 64.519µs 64.672µs 64.850µs 64.988µs 0.86% 0.510 0.964 0.23% 0.011µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15387348.384op/s 15520982.128op/s ± 36145.091op/s 15520278.561op/s ± 24434.336op/s 15545600.890op/s 15576277.958op/s 15585999.213op/s 15630911.691op/s 0.71% -0.491 0.932 0.23% 2555.844op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.770µs 58.054µs ± 0.164µs 58.053µs ± 0.111µs 58.161µs 58.336µs 58.434µs 58.820µs 1.32% 0.658 1.409 0.28% 0.012µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17000958.245op/s 17225543.715op/s ± 48692.317op/s 17225645.523op/s ± 32999.491op/s 17260615.591op/s 17297661.964op/s 17307391.261op/s 17310043.287op/s 0.49% -0.633 1.311 0.28% 3443.067op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.890µs 3.911µs ± 0.003µs 3.911µs ± 0.001µs 3.913µs 3.918µs 3.919µs 3.920µs 0.22% -0.964 11.444 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255122776.590op/s 255668171.955op/s ± 197955.485op/s 255690168.290op/s ± 88469.143op/s 255772856.107op/s 255893154.068op/s 255985717.911op/s 257056827.949op/s 0.53% 0.994 11.646 0.08% 13997.567op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.561µs 54.843µs ± 0.224µs 54.793µs ± 0.133µs 54.953µs 55.315µs 55.527µs 55.706µs 1.67% 1.316 1.703 0.41% 0.016µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17951287.269op/s 18234017.677op/s ± 74144.549op/s 18250395.656op/s ± 44335.392op/s 18292723.612op/s 18312281.683op/s 18320372.862op/s 18328144.699op/s 0.43% -1.292 1.609 0.41% 5242.811op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.139µs 52.208µs ± 0.037µs 52.204µs ± 0.025µs 52.230µs 52.266µs 52.299µs 52.404µs 0.38% 1.112 3.373 0.07% 0.003µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19082421.750op/s 19154141.911op/s ± 13604.846op/s 19155733.017op/s ± 9256.380op/s 19164283.525op/s 19172448.712op/s 19175272.910op/s 19179518.193op/s 0.12% -1.104 3.325 0.07% 962.008op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.026µs 6.037µs ± 0.016µs 6.033µs ± 0.002µs 6.036µs 6.069µs 6.110µs 6.144µs 1.85% 3.900 17.303 0.26% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 162751154.958op/s 165634522.918op/s ± 423865.278op/s 165759493.785op/s ± 55673.277op/s 165796277.924op/s 165885549.581op/s 165914664.295op/s 165939312.707op/s 0.11% -3.869 16.980 0.26% 29971.801op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.911µs; 3.911µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/ throughput [255660771.064op/s; 255702793.721op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [78.432µs; 78.656µs] or [-0.142%; +0.142%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12714966.131op/s; 12751090.554op/s] or [-0.142%; +0.142%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [70.846µs; 71.018µs] or [-0.122%; +0.122%] None None None
credit_card/is_card_number/ 378282246310005 throughput [14082063.329op/s; 14116097.320op/s] or [-0.121%; +0.121%] None None None
credit_card/is_card_number/37828224631 execution_time [3.910µs; 3.911µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631 throughput [255683694.124op/s; 255729626.129op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/378282246310005 execution_time [68.153µs; 68.337µs] or [-0.135%; +0.135%] None None None
credit_card/is_card_number/378282246310005 throughput [14634786.173op/s; 14674055.159op/s] or [-0.134%; +0.134%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.208µs; 52.218µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19150503.356op/s; 19154291.908op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.034µs; 6.038µs] or [-0.031%; +0.031%] None None None
credit_card/is_card_number/x371413321323331 throughput [165616469.986op/s; 165717350.400op/s] or [-0.030%; +0.030%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.912µs; 3.912µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255601907.190op/s; 255655098.984op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.408µs; 64.450µs] or [-0.032%; +0.032%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15515972.766op/s; 15525991.490op/s] or [-0.032%; +0.032%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.031µs; 58.077µs] or [-0.039%; +0.039%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17218795.428op/s; 17232292.002op/s] or [-0.039%; +0.039%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.911µs; 3.912µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255640737.228op/s; 255695606.681op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.812µs; 54.875µs] or [-0.057%; +0.057%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18223741.956op/s; 18244293.398op/s] or [-0.056%; +0.056%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.203µs; 52.213µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19152256.411op/s; 19156027.412op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.035µs; 6.040µs] or [-0.036%; +0.036%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165575779.267op/s; 165693266.569op/s] or [-0.035%; +0.035%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.145µs 3.220µs ± 1.454µs 3.003µs ± 0.027µs 3.029µs 3.681µs 13.855µs 15.408µs 413.15% 7.357 55.481 45.03% 0.103µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.019µs; 3.422µs] or [-6.256%; +6.256%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2597 execution_time 6.192ms 6.260ms ± 0.049ms 6.244ms ± 0.015ms 6.267ms 6.374ms 6.415ms 6.536ms 4.68% 2.327 6.759 0.78% 0.003ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2597 execution_time [6.253ms; 6.267ms] or [-0.108%; +0.108%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 86.396µs 86.628µs ± 0.147µs 86.607µs ± 0.070µs 86.691µs 86.819µs 87.011µs 87.948µs 1.55% 3.972 31.489 0.17% 0.010µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [86.608µs; 86.649µs] or [-0.023%; +0.023%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 244.074ns 254.802ns ± 12.324ns 249.064ns ± 3.789ns 258.120ns 281.932ns 288.242ns 292.591ns 17.48% 1.414 0.861 4.82% 0.871ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [253.094ns; 256.510ns] or [-0.670%; +0.670%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 33.743µs 34.292µs ± 0.984µs 33.843µs ± 0.052µs 33.938µs 36.324µs 36.360µs 38.901µs 14.95% 1.900 2.477 2.86% 0.070µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [34.155µs; 34.428µs] or [-0.398%; +0.398%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 60.048ms 60.459ms ± 1.943ms 60.190ms ± 0.055ms 60.268ms 60.449ms 65.707ms 82.289ms 36.72% 9.382 93.236 3.21% 0.137ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [60.190ms; 60.728ms] or [-0.445%; +0.445%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 160.397µs 161.069µs ± 0.347µs 161.032µs ± 0.128µs 161.162µs 161.495µs 161.874µs 164.519µs 2.17% 5.233 47.953 0.21% 0.025µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [161.021µs; 161.117µs] or [-0.030%; +0.030%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 18.272µs 27.027µs ± 10.500µs 18.606µs ± 0.189µs 36.622µs 47.226µs 52.462µs 72.930µs 291.97% 0.900 0.410 38.75% 0.742µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [25.572µs; 28.482µs] or [-5.384%; +5.384%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 868f0dc 1759983544 PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 534.141µs 534.903µs ± 0.377µs 534.874µs ± 0.269µs 535.168µs 535.432µs 536.097µs 536.292µs 0.27% 0.550 0.668 0.07% 0.027µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1864657.049op/s 1869498.584op/s ± 1318.544op/s 1869599.812op/s ± 939.343op/s 1870477.107op/s 1871514.919op/s 1871997.570op/s 1872165.253op/s 0.14% -0.545 0.654 0.07% 93.235op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 379.655µs 380.361µs ± 0.374µs 380.313µs ± 0.203µs 380.527µs 381.048µs 381.222µs 382.964µs 0.70% 2.041 10.881 0.10% 0.026µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2611212.091op/s 2629086.660op/s ± 2580.900op/s 2629411.939op/s ± 1404.704op/s 2630724.188op/s 2632265.053op/s 2633538.025op/s 2633972.728op/s 0.17% -2.015 10.667 0.10% 182.497op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 193.760µs 194.614µs ± 0.383µs 194.701µs ± 0.223µs 194.883µs 195.088µs 195.220µs 196.359µs 0.85% -0.078 1.207 0.20% 0.027µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5092723.075op/s 5138405.087op/s ± 10121.271op/s 5136079.410op/s ± 5881.743op/s 5144589.013op/s 5157146.115op/s 5160336.735op/s 5161023.947op/s 0.49% 0.096 1.147 0.20% 715.682op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 35.953µs 36.115µs ± 0.060µs 36.118µs ± 0.039µs 36.156µs 36.212µs 36.255µs 36.279µs 0.45% -0.017 -0.109 0.17% 0.004µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 27564207.971op/s 27689251.739op/s ± 46297.610op/s 27687065.512op/s ± 29953.201op/s 27719844.467op/s 27769992.526op/s 27789067.200op/s 27814077.280op/s 0.46% 0.026 -0.111 0.17% 3273.735op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 44.897µs 45.084µs ± 0.198µs 45.029µs ± 0.128µs 45.235µs 45.370µs 45.464µs 46.413µs 3.07% 1.763 8.370 0.44% 0.014µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21545476.156op/s 22181147.516op/s ± 96487.296op/s 22207992.742op/s ± 63358.431op/s 22269754.401op/s 22271792.634op/s 22272576.283op/s 22273197.597op/s 0.29% -1.671 7.558 0.43% 6822.682op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [534.851µs; 534.955µs] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1869315.847op/s; 1869681.322op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [380.309µs; 380.412µs] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2628728.973op/s; 2629444.348op/s] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [194.561µs; 194.667µs] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5137002.376op/s; 5139807.798op/s] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [36.107µs; 36.124µs] or [-0.023%; +0.023%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [27682835.335op/s; 27695668.142op/s] or [-0.023%; +0.023%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.057µs; 45.112µs] or [-0.061%; +0.061%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [22167775.305op/s; 22194519.727op/s] or [-0.060%; +0.060%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2025

Codecov Report

❌ Patch coverage is 71.42857% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.84%. Comparing base (e741848) to head (868f0dc).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1065      +/-   ##
==========================================
+ Coverage   71.68%   71.84%   +0.15%     
==========================================
  Files         355      357       +2     
  Lines       56312    56751     +439     
==========================================
+ Hits        40369    40771     +402     
- Misses      15943    15980      +37     
Components Coverage Δ
datadog-crashtracker 49.33% <ø> (ø)
datadog-crashtracker-ffi 5.93% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 88.01% <ø> (-2.44%) ⬇️
data-pipeline-ffi 88.19% <ø> (ø)
ddcommon 84.54% <ø> (+0.24%) ⬆️
ddcommon-ffi 73.84% <ø> (ø)
ddtelemetry 59.49% <ø> (-0.53%) ⬇️
ddtelemetry-ffi 21.24% <ø> (ø)
dogstatsd-client 83.26% <ø> (ø)
datadog-ipc 82.39% <ø> (ø)
datadog-profiling 76.83% <71.42%> (-0.07%) ⬇️
datadog-profiling-ffi 62.12% <ø> (ø)
datadog-sidecar 37.01% <ø> (-0.18%) ⬇️
datdog-sidecar-ffi 11.03% <ø> (-0.84%) ⬇️
spawn-worker 55.35% <ø> (ø)
tinybytes 92.22% <ø> (ø)
datadog-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <ø> (ø)
datadog-trace-protobuf 59.65% <ø> (ø)
datadog-trace-utils 89.84% <ø> (+0.07%) ⬆️
datadog-tracer-flare 54.52% <ø> (ø)
datadog-log 76.31% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@morrisonlevi morrisonlevi force-pushed the PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog branch from 80c8f07 to 0d6cabc Compare May 19, 2025 22:56
UploadCompression::Zstd => Self {
buffer: Vec::with_capacity(TEMPORARY_BUFFER_SIZE),
compressor: Compressor::Zstd {
// A level of 0 uses zstd's default (currently 3).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that the level 3 from the upstream zstd C library? If yes, level 3 is good. I'm asking because there are different zstd implementations out there which assign different meanings to different levels.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, at least as far as I understood it.

@morrisonlevi morrisonlevi force-pushed the PROF-11830-Add-upload-compression-configuration-to-libdatadog branch 2 times, most recently from d301705 to 8fa167e Compare May 25, 2025 19:25
@morrisonlevi morrisonlevi changed the title feat(profiling): add zstd as a compression option feat(profiling): zstd as a compression option May 25, 2025
@morrisonlevi morrisonlevi force-pushed the PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog branch 2 times, most recently from 8788621 to 714ecc0 Compare May 27, 2025 16:33
@morrisonlevi morrisonlevi force-pushed the PROF-11830-Add-upload-compression-configuration-to-libdatadog branch from 5d54a41 to 9cafb27 Compare May 27, 2025 16:42
@morrisonlevi morrisonlevi force-pushed the PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog branch from 714ecc0 to 5ed02e4 Compare May 27, 2025 16:42
@morrisonlevi morrisonlevi force-pushed the PROF-11830-Add-upload-compression-configuration-to-libdatadog branch from 9cafb27 to c4c8301 Compare May 28, 2025 21:18
@morrisonlevi morrisonlevi force-pushed the PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog branch 2 times, most recently from 064a512 to 6f72248 Compare May 28, 2025 21:23
@morrisonlevi morrisonlevi force-pushed the PROF-11830-Add-upload-compression-configuration-to-libdatadog branch 2 times, most recently from 49d50fa to 9fa834b Compare May 29, 2025 02:32
@morrisonlevi morrisonlevi force-pushed the PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog branch 2 times, most recently from a13e0dd to b751d09 Compare May 29, 2025 17:49
@morrisonlevi morrisonlevi force-pushed the PROF-11830-Add-upload-compression-configuration-to-libdatadog branch from 9fa834b to 35933df Compare May 29, 2025 17:49
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To override this behavior, add the keep-open label or update the PR.

@github-actions github-actions bot added the stale Used by actions/stale to identify PRs that have been inactive for 90+ days label Aug 28, 2025
@morrisonlevi morrisonlevi added the keep-open Overrides actions/stale auto-closing stale PRs label Aug 28, 2025
@morrisonlevi morrisonlevi force-pushed the PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog branch from b751d09 to 958b210 Compare September 30, 2025 18:01
@morrisonlevi morrisonlevi changed the base branch from PROF-11830-Add-upload-compression-configuration-to-libdatadog to main September 30, 2025 20:43
@morrisonlevi morrisonlevi removed the stale Used by actions/stale to identify PRs that have been inactive for 90+ days label Sep 30, 2025
@morrisonlevi morrisonlevi changed the title feat(profiling): zstd as a compression option perf(profiling): use zstd for compression Sep 30, 2025
@morrisonlevi morrisonlevi changed the title perf(profiling): use zstd for compression perf(profiling)!: use zstd for compression Sep 30, 2025
@morrisonlevi morrisonlevi force-pushed the PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog branch from 6630172 to c2a9233 Compare October 9, 2025 01:10
@morrisonlevi morrisonlevi force-pushed the PROF-11832-Add-zstd-to-compression-configuration-to-libdatadog branch from c2a9233 to 868f0dc Compare October 9, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request keep-open Overrides actions/stale auto-closing stale PRs profiling Relates to the profiling* modules.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants